<layout name="ding" />
<!-- 搜索 -->
<div id="search" class="clearfix">
    <a class="prev fl" href="{:U('Face/User/index')}" title="后退">&lt;</a>
    <div class="head fl">我的订单</div>
</div>
<!-- 搜索 -->

<!-- 内容切换 -->
<div id="switch">
    <div id="navCont">
        <!-- 导航 -->
        <div id="nav" class="clearfix">
            <ul class="nav list5">
                <li style="width: 23%"><h2 ><a href="{:U('Face/Ding/all')}" title="">全部</a></h2></li>
                <li style="width: 23%"><h2 class="cur"><a href="{:U('Face/Ding/other',['where'=>0])}" title="">待付款</a></h2></li>
                <li style="width: 23%"><h2><a href="{:U('Face/Ding/daifahuo',['where'=>1])}" title="">待发货</a></h2></li>
                <li style="width: 23%"><h2><a href="{:U('Face/Ding/daishouhuo',['where'=>2])}" title="">待收货</a></h2></li>
            </ul>
        </div>
        <!-- 导航 -->
        <style>
            .listDele{ line-height:64px;}
        </style>
        <!-- 内容 -->
        <div id="cont" class="clearfix">
            <ul class="switchCont listFive" style=" display:block;">
                <volist name="data" id="vo">
                <li class="bt0">
                    <a href="{:U('Face/Ding/content',['id'=>$vo['id']])}">
                        <img src="__ROOT__/data/upload/{$vo.goodid.goods_thumb}" class="listImg fl" />
                        <div class="listDiv fl">
                            <h4 class="listSp">商品名</h4>
                            <div class="listJs">{$vo.goodid.goods_name}</div>
                            <div class="listJs">
                                <p class="unit fl">单价：{$vo.goodid.goods_xiaoshou}元</p>
                                <p class="unit fl">数量：{$vo.num}</p>
                            </div>
                        </div>
                    </a>
                    <if condition="$vo['where'] eq 0 "> <a class="listDele fr" style="width: 30%;height:100%;text-align: center;background: red;color: white;border-radius: 5px;" href="{:U('Face/Ding/wechatpay',['id'=>$vo['id']])}">点击付款</a>
                        <elseif condition="$vo['where'] eq 1"/><a class="listDele fr"></a>
                        <elseif condition="$vo['where'] eq 2"/><a class="listDele fr"  style="width: 30%;height:100%;text-align:center;background: red;color: white;border-radius: 5px;" href="{:U('Face/Ding/queren',['id'=>$vo['id']])}">确认收货</a>
                        <else /> <a class="listDele fr">交易成功</a>
                    </if>
                </li>
                </volist>
            </ul>
        </div>
        <!-- 内容 -->
    </div>
</div>
<!-- 内容切换 -->

<!-- javascript -->
<script type="text/javascript">
    //列表切换
    var oTab=document.getElementById("navCont");
    var aH3=oTab.getElementsByTagName("h2");
    var aDiv=document.getElementsByClassName("switchCont");
    for(var i=0;i<aH3.length;i++){
        aH3[i].index=i;
        aH3[i].onclick=function(){
            for(var i=0;i<aH3.length;i++){
                aH3[i].className="";
                aDiv[i].style.display="none";
            }
            this.className="cur";
            aDiv[this.index].style.display="block";
        }
    }
</script>
<!-- javascript -->